<template>
	<view class="repair">
		<view style="width: 100%;background-color: #FFFFFF;">
			<view class="cardCon" style="background-color: #FFFFFF;">
				<view style="font-size: 18px;color: #999999;margin-top: 10px;" v-if="!userObj">
					暂无家人信息
				</view>
				<view v-for="(item,index) in userObj">
					<view style="font-size: 18px;color: #999999;margin-top: 10px;">
						家人{{index+1}}
					</view>
					  <view class="list_text">
						  <view class="list_text_name">
						    <text style="font-size: 16px;  margin-left: 10px;">
						  	  姓名：<text style="float: right;">{{item.tenant_name}}</text>
						    </text>
						  </view>
						  <view class="list_text_name">
						    <text style="font-size: 16px;  margin-left: 10px;">
						  	  电话：<text style="float: right;">{{item.tenant_tell}}</text>
						    </text>
						  </view>
						  <view class="list_text_name">
						    <text style="font-size: 16px;  margin-left: 10px;">
						  	  性别：<text style="float: right;">{{item.tenant_sex==1?"男":item.tenant_sex==2?"女":"暂无"}}</text>
						    </text>
						  </view>
						  <view class="list_text_name">
						    <text style="font-size: 16px;  margin-left: 10px;">
						  	  民族：<text style="float: right;">{{item.tenant_mz}}</text>
						    </text>
						  </view>
						  <view class="list_text_name">
						    <text style="font-size: 16px;  margin-left: 10px;">
						  	  出生日期：<text style="float: right;">{{item.born_time}}</text>
						    </text>
						  </view>
						<view class="list_text_name">
						  <text style="font-size: 16px;  margin-left: 10px;">
							  身份证：<text style="float: right;">{{item.dentity_card}}</text>
						  </text>
						</view>
						<!-- <text style="color: #999999;font-size: 16px">租户身份证</text>
						<view class="list_text_name">
						  <img v-if="userObj.ten_card_posi" :src="userObj.ten_card_posi" style="width: 40%;height: 80%;"></img>
						  <img v-if="userObj.ten_card_side" :src="userObj.ten_card_side" style="width: 40%;height: 80%;margin-left: 15px;"></img>
						</view> -->
					  </view>
				</view>
				<view v-if="dataObj.ten_is_void==2" style="width: 45px;height: 45px;position: absolute;top: 600px;right: 50rpx;">
					<image @click="navToAdd()" style="width: 40px;height: 40px;" src="../../static/image/tenAddDatas.png"></image>
				</view>
			</view>
		</view>
		
	</view>
</template>

<script>
	
	export default {
		data() {
			return {
				userObj:[],
				ten_id:null,
				dataObj:null,
			};
		},
		onLoad(options) {
			const datas = JSON.parse(decodeURIComponent(options.datas));
			console.log(datas)
			this.dataObj = datas;
			this.ten_id = datas.id;
			this.userObj = datas.familyList;
			console.log(this.userObj)
		},
		methods: {
			navToAdd() {
				uni.navigateTo({
					url: '/pages/rentsale/addFamily?id='+this.ten_id
				});
			},
		},
	};
</script>

<style>
	.repair {
		width: 100%;
		
		
	}
	.cardCon{
		width: 90%;
		margin: 20px auto;
		padding-bottom: 48px;
	}
	.list-li{
		
	}
	.list_text_name{
		padding-top: 10px;
	}
	.list-img{
		padding-top: 10px;
	}
	
	.repair-wrap {
		width: 100%;
		height: auto;
		overflow: hidden;
	
		.repair-box {
			background: #fff;
	
			.repair-titel {
				height: 44rpx;
				line-height: 44rpx;
	
				.repair-titel-l {
					float: left;
				}
	
				.repair-titel-r {
					float: right;
					color: #999;
				}
			}
	
			.repair-6 {
				color: #666;
			}
		}
	}
	.header-li {
		// display: flex;
		// align-items: center;
		font-family: PingFangSC-Medium, PingFang SC;
		font-weight: 500;
		line-height: 105rpx;
		color: #333333;
		border-bottom: 1rpx solid #EEEEEE;
	}
</style>
